import tensorflow as tf

if __name__ == '__main__':
    var1 = tf.constant([[1, 2, 3], [2, 3, 6]])
    var2 = tf.constant([[3, 4], [2, 7], [3, 5]])
    result = tf.matmul(var2, var1)

    # basic 给每一个项都加上一个偏置
    add = tf.matmul(var2, var1) + tf.constant(10)

    var3 = tf.constant(3)
    var4 = tf.constant(4)
    result2 = tf.multiply(var3, var4)

    with tf.Session() as session:
        print(session.run(result), session.run(var1).shape, session.run(var2).shape, session.run(result).shape)
        print(session.run(result2))
        print(session.run(add))
